<?php

class Index extends MY_Controller {

    function get_product_cate() {
         /* @var $cateOb cate_model */
        $this->load->model('cate_model');
        $cateOb = $this->cate_model;
        $list = $cateOb->get_by_field(array('parent_id'=>0));
        $str = '<ul style="display: none;" class="subNavi">';
        foreach ($list as $item){
            $str.='<li> <a title="'.$item['title'].'" href="/products/'.$item['id'].'">'.$item['title'].'</a></li>';
        }
            //<li> <a title="Cho thuê thiết bị" href="/cho-thue-thiet-bi.html">Cho thuê thiết bị</a></li>

        $str .= '</ul>';
        echo $str;
    }

}